package com.miao.admin.controller;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.api.ApiController;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.miao.admin.service.AdminProductService;
import com.miao.common.entity.R;
import com.miao.common.entity.pojo.Product;
import com.miao.common.entity.pojo.Recommend;
import com.miao.admin.service.AdminRecommendService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.io.Serializable;
import java.util.List;

/**
 * 首页商品推荐表(Recommend)表控制层
 *
 * @author MiaoWenQing
 * @since 2021-02-19 00:17:17
 */
@RestController
@RequestMapping("common/recommend")
public class AdminRecommendController  {
    /**
     * 服务对象
     */

    @Resource
    private AdminProductService adminProductService;



    /**
     * 获取所有降价商品
     * @return R
     *
     */
    @GetMapping("/getRecPro")
    public R getRecList(){

        List<Product> list = this.adminProductService.proRecList();

        return R.ok(list);


    }


}
